const mongoose = require("mongoose");
const Schema = mongoose.Schema;

// Create Schema
const ReportSchema = new Schema(
  {
    photos: {
      type: Array,
    },
    plate: {
      type: String,
      required: true,
    },
    behavior: {
      type: String,
      required: true,
    },
    locations: {
      type: String,
      required: true,
    },
    time: {
      type: String,
      required: true,
    },
    public: {
      type: Boolean,
      required: true,
    },
    remark: {
      type: String,
    },
    pass: {
      type: Boolean,
      default: false,
      required: true,
    },
    date: {
      type: Date,
      default: Date.now,
    },
  },
  { versionKey: false }
);

module.exports = Report = mongoose.model("report", ReportSchema);
